//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

namespace Microsoft.Research.ScientificWorkflow.TridentUtilities
{
    #region Using Directives
    using System.Globalization;
    using ManagementStudioResources = Microsoft.Research.ScientificWorkflow.TridentUtilities.Properties.ManagementStudio;
    #endregion

    /// <summary>
    /// This class is used to get the String for the key given from the resource manager.
    /// </summary>
    public static class ManagementStudioResourceManager
    {
        /// <summary>
        /// Get the value for the key.
        /// </summary>
        /// <param name="resourceName">Resource key.</param>
        /// <returns>Get the value of the key.</returns>
        public static string GetString(string resourceName)
        {
            return ManagementStudioResources.ResourceManager.GetString(resourceName, CultureInfo.CurrentUICulture);
        }

        /// <summary>
        /// Get the value of the key in the specified format.
        /// </summary>
        /// <param name="resourceName">Resource key.</param>
        /// <param name="formattedStrings">Value array.</param>
        /// <returns>Get the value of the key.</returns>
        public static string GetString(string resourceName, params object[] formattedStrings)
        {
            return string.Format(CultureInfo.CurrentUICulture, GetString(resourceName), formattedStrings);
        }
    }
}

